package com.shuzhi.stationarysource.modules.job.repository;


import com.shuzhi.stationarysource.modules.job.domain.WryKeyInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>项目名称: sdbd-parent </p>
 * <p>描述: 污染源关键信息Repository  </p>
 * <p>创建时间: 2018/9/28 14:07</p>
 * <p>公司信息: LeadingSoft</p>
 *
 * @author Changqing LI
 * @version v1.0
 */
public interface WryKeyInfoRepository extends JpaRepository<WryKeyInfo, Long>, JpaSpecificationExecutor<WryKeyInfo> {

//    setPollutionCd

    /**
     * 修改污染源POLLUTION_CD 状态
     * @param id
     * @return
     */
    @Modifying
    @Query(value = "UPDATE WRY_KEY_INFO SET POLLUTION_CD=?1 where ID=?2",nativeQuery = true)
    Integer modifyingPollutionCd(String pollutionCd, String id);
}
